/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * service_typeEntity
 * @author hzy
 * @version 2021-07-30
 */
@Table(name="kj_service_type", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="code", attrName="code", label="类型code"),
		@Column(name="type_name", attrName="typeName", label="类型名", queryType=QueryType.LIKE),
		@Column(includeEntity=DataEntity.class),
		@Column(name="need_service_time", attrName="needServiceTime", label="是否需要服务时长"),
	}, orderBy="a.update_date DESC"
)
public class KjServiceType extends DataEntity<KjServiceType> {
	
	private static final long serialVersionUID = 1L;
	private String code;		// 类型code
	private String typeName;		// 类型名
	private String needServiceTime;		// 是否需要服务时长
	
	public KjServiceType() {
		this(null);
	}

	public KjServiceType(String id){
		super(id);
	}
	
	@NotBlank(message="类型code不能为空")
	@Length(min=0, max=255, message="类型code长度不能超过 255 个字符")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@NotBlank(message="类型名不能为空")
	@Length(min=0, max=255, message="类型名长度不能超过 255 个字符")
	public String getTypeName() {
		return typeName;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	
	@Length(min=0, max=1, message="是否需要服务时长长度不能超过 1 个字符")
	public String getNeedServiceTime() {
		return needServiceTime;
	}

	public void setNeedServiceTime(String needServiceTime) {
		this.needServiceTime = needServiceTime;
	}
	
}